package com.auto.api.core.entity;

import java.util.List;
import java.util.Map;
import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.ResolvableType;

/**
 * Description: api映射项
 *
 * @author liangshf
 * @date 2019年4月29日
 */
@Data
public class ApiInfo {
	private static final Logger logger = LoggerFactory.getLogger(ApiInfo.class);
	private String controllerName;
	/**
	 * controller描述
	 */
	private String controllerRmk;
	private String methodName;
	/**
	 * 方法描述
	 */
	private String methodRmk;
	private String requestType;
	private String requestUrl;
	private String methodParamType;
	private String argsStr;

	/**
	 * 封装了返回所有泛型信息的类型
	 */
	private ResolvableType resolvableType;

	/**
	 * 封装了入参所有泛型信息的类型List
	 */
	private List<ParamNameResolvableType> paramResolvableTypeList;

	/**
	 * 返回值json
	 */
	private String resultJson;

	/**
     * 方法参数 json
     */
	private String paramJson;

	/**
     * 自动化参数值json
     */
	private String autoParamJson;

	/**
	 * yapi 返回值Api json
	 */
	private String resultApiJson;

	/**
	 * yapi 方法参数Api json
	 */
	private String paramApiJson;

	/**
	 * torna 方法参数Api json
	 */
	private String tornaParamApiJson;

	/**
	 * torna 返回值Api json
	 */
	private String tornaResultApiJson;
	
	private Map<String, String> attrType; 
	
	private Map<String, Object> paramMap;

	public ApiInfo() {
	}

	public ApiInfo(String requestUrl, String requestType,
			String controllerName, String requestMethodName) {
		this.requestUrl = requestUrl;
		this.requestType = requestType;
		this.controllerName = controllerName;
		this.methodName = requestMethodName;
	}
}
